package controllers;

import com.avaje.ebean.Ebean;
import models.Employe;
import play.mvc.*;

import views.html.*;

import play.libs.Yaml;

import java.util.Collection;
import java.util.Map;

public class Application extends Controller {

    public static Result index() {
        return ok(index.render("Your new application is ready."));
    }




    // insert dans BD information du fichier de configuration


    public static Result initAll() {
        Employe emp = Employe.find.byId((long) 1);
        Map all= (Map)Yaml.load("initial-data.yaml");
      //Ebean.save((Collection) (all.get("employes")));
       //Ebean.save((Collection) (all.get("Absences")));
        return Results.TODO;
    }
}
